if len(df) > 0:
    first_row = df.iloc[0]
else:
    print("No rows to access.")